using System;

namespace Sedna.Core.Controller.Configurations
{
	/// <summary>
	/// Default implementation of IConditionConfiguration.
	/// </summary>
	public class ConditionConfiguration: ClientScriptingConfiguration,  IConditionConfiguration
	{
        private IDropDownListConfiguration dropDownListConfiguration;
        private IConfiguration blinkerConfiguration;
	    
	    
	    
		private object invisibleValue;

		private string conditionBindPath;
		private string conditionUnbindPath;

	    public IDropDownListConfiguration DropDownListConfiguration
	    {
	        get { return dropDownListConfiguration; }
	        set { dropDownListConfiguration = value; }
	    }

	    public IConfiguration BlinkerConfiguration
	    {
	        get { return blinkerConfiguration; }
	        set { blinkerConfiguration = value; }
	    }

		public object InvisibleValue
		{
			get { return invisibleValue; }
			set { invisibleValue = value; }
		}


		public string ConditionBindPath
		{
			get { return conditionBindPath; }
			set { conditionBindPath = value; }
		}

		public string ConditionUnbindPath
		{
			get { return conditionUnbindPath; }
			set { conditionUnbindPath = value; }
		}

		public string ConditionPath
		{
			set
			{
				conditionUnbindPath = value;
				conditionBindPath = value;
			}
		}

        public override IConfiguration CreateFromTemplate()
        {
            ConditionConfiguration that = (ConditionConfiguration)base.CreateFromTemplate();
            that.dropDownListConfiguration = dropDownListConfiguration;
            that.blinkerConfiguration = blinkerConfiguration;
            that.invisibleValue = invisibleValue;
            that.conditionBindPath = conditionBindPath;
            that.conditionUnbindPath = conditionUnbindPath;
            return that;
        }

	}
}
